
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<title>产品详情页</title>

    <link rel="stylesheet" type="text/css" href="/static/home/css/pages-item.css" />
    <link rel="stylesheet" type="text/css" href="/static/home/css/pages-zoom.css" />

	<script type="text/javascript" src="/static/home/js/pages/index.js"></script>
	<script type="text/javascript" src="/static/home/js/pages/item.js"></script>
</head>

<body>

	<div class="py-container">
		<div id="item">
			<div class="crumb-wrap">
				<ul class="sui-breadcrumb">
					<li>
						<a href="#">手机、数码、通讯</a>
					</li>
					<li>
						<a href="#">手机</a>
					</li>
					<li>
						<a href="#">Apple苹果</a>
					</li>
					<li class="active">iphone 6S系类</li>
				</ul>
			</div>
			<!--product-info-->
			<div class="product-info">
				<div class="fl preview-wrap">
					<!--放大镜效果-->
					<div class="zoom">
						<!--默认第一个预览-->
						<div id="preview" class="spec-preview">
							<span class="jqzoom"><img jqimg="/static/home/img/phone/2_big.jpg" src="/static/home/img/phone/2_big.jpg" /></span>
						</div>
						<!--下方的缩略图-->
						<div class="spec-scroll">
							<a class="prev">&lt;</a>
							<!--左右按钮-->
							<div class="items">
								<ul>
									{foreach $info.images as $image}
										<li><img src="{$image.pics_sma}" bimg="{$image.pics_big}" onmousemove="preview(this)" /></li>
									{/foreach}
									<li><img src="/static/home/img/_/s1.png" bimg="/static/home/img/_/b1.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s2.png" bimg="/static/home/img/_/b2.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s3.png" bimg="/static/home/img/_/b3.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s1.png" bimg="/static/home/img/_/b1.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s2.png" bimg="/static/home/img/_/b2.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s3.png" bimg="/static/home/img/_/b3.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s1.png" bimg="/static/home/img/_/b1.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s2.png" bimg="/static/home/img/_/b2.png" onmousemove="preview(this)" /></li>
									<li><img src="/static/home/img/_/s3.png" bimg="/static/home/img/_/b3.png" onmousemove="preview(this)" /></li>
								</ul>
							</div>
							<a class="next">&gt;</a>
						</div>
					</div>
				</div>
				<div class="fr itemInfo-wrap">
					<div class="sku-name">
						<h4>{$info.goods_name}</h4>
					</div>
					<div class="news"><span>推荐选择下方[移动优惠购],手机套餐齐搞定,不用换号,每月还有花费返</span></div>
					<div class="summary">
						<div class="summary-wrap">
							<div class="fl title">
								<i>价　　格</i>
							</div>
							<div class="fl price">
								<i>¥</i>
								<em>{$info.goods_price}</em>
								<span>降价通知</span>
							</div>
							<div class="fr remark">
								<i>累计评价</i><em>612188</em>
							</div>
						</div>
						<div class="summary-wrap">
							<div class="fl title">
								<i>促　　销</i>
							</div>
							<div class="fl fix-width">
								<i class="red-bg">加价购</i>
								<em class="t-gray">满999.00另加20.00元，或满1999.00另加30.00元，或满2999.00另加40.00元，即可在购物车换购热销商品</em>
							</div>
						</div>
					</div>
					<div class="support">
						<div class="summary-wrap">
							<div class="fl title">
								<i>支　　持</i>
							</div>
							<div class="fl fix-width">
								<em class="t-gray">以旧换新，闲置手机回收  4G套餐超值抢  礼品购</em>
							</div>
						</div>
						<div class="summary-wrap">
							<div class="fl title">
								<i>配 送 至</i>
							</div>
							<div class="fl fix-width">
								<em class="t-gray">满999.00另加20.00元，或满1999.00另加30.00元，或满2999.00另加40.00元，即可在购物车换购热销商品</em>
							</div>
						</div>
					</div>
					<div class="clearfix choose">
						<div id="specification" class="summary-wrap clearfix">
							{foreach $info.spec as $k => $spec}
							<dl>
								<dt>
									<div class="fl title">
										<i>{$spec.spec_name}</i>
									</div>
								</dt>
								{foreach $spec.values as $index =>  $value}
									{if $index == 0}
									<dd><a href="javascript:;" class="selected" spec_value_id="{$value.id}">{$value.value}<span title="点击取消选择">&nbsp;</span></a></dd>
									{else }
									<dd><a href="javascript:;" spec_value_id="{$value.id}">{$value.value}<span title="点击取消选择">&nbsp;</span></a></dd>
									{/if}

								{/foreach}
<!--								<dd><a href="javascript:;" class="selected">金色<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--								<dd><a href="javascript:;">银色<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--								<dd><a href="javascript:;">黑色<span title="点击取消选择">&nbsp;</span></a></dd>-->
							</dl>
							{/foreach}
<!--							<dl>-->
<!--								<dt>-->
<!--									<div class="fl title">-->
<!--									<i>内存容量</i>-->
<!--								</div>-->
<!--								</dt>-->
<!--								<dd><a href="javascript:;" class="selected">16G<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--								<dd><a href="javascript:;">64G<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--								<dd><a href="javascript:;" class="locked">128G<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--							</dl>-->
<!--							<dl>-->
<!--								<dt>-->
<!--									<div class="fl title">-->
<!--									<i>选择版本</i>-->
<!--								</div>-->
<!--								</dt>-->
<!--								<dd><a href="javascript:;" class="selected">公开版<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--								<dd><a href="javascript:;">移动版<span title="点击取消选择">&nbsp;</span></a></dd>							-->
<!--							</dl>-->
<!--							<dl>-->
<!--								<dt>-->
<!--									<div class="fl title">-->
<!--									<i>购买方式</i>-->
<!--								</div>-->
<!--								</dt>-->
<!--								<dd><a href="javascript:;" class="selected">官方标配<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--								<dd><a href="javascript:;">移动优惠版<span title="点击取消选择">&nbsp;</span></a></dd>	-->
<!--								<dd><a href="javascript:;"  class="locked">电信优惠版<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--							</dl>-->
<!--							<dl>-->
<!--								<dt>-->
<!--									<div class="fl title">-->
<!--									<i>套　　装</i>-->
<!--								</div>-->
<!--								</dt>-->
<!--								<dd><a href="javascript:;" class="selected">保护套装<span title="点击取消选择">&nbsp;</span></a></dd>-->
<!--								<dd><a href="javascript:;"  class="locked">充电套装<span title="点击取消选择">&nbsp;</span></a></dd>	-->
<!--								-->
<!--							</dl>	-->
						</div>
						
						<div class="summary-wrap">
							<div class="fl title">
								<div class="control-group">
									<div class="controls">
										<input id="number" autocomplete="off" type="text" value="1" minnum="1" class="itxt" />
										<a href="javascript:void(0)" id="plus" class="increment plus">+</a>
										<a href="javascript:void(0)" id="mins" class="increment mins">-</a>
									</div>
								</div>
							</div>
							<div class="fl">
								<ul class="btn-choose unstyled">
									<li>
										<a href="javascript:void(0)"  class="sui-btn  btn-danger addshopcar">加入购物车</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--product-detail-->
			<div class="clearfix product-detail">
				<div class="fl aside">
					<ul class="sui-nav nav-tabs tab-wraped">
						<li class="active">
							<a href="#index" data-toggle="tab">
								<span>相关分类</span>
							</a>
						</li>
						<li>
							<a href="#profile" data-toggle="tab">
								<span>推荐品牌</span>
							</a>
						</li>
					</ul>
					<div class="tab-content tab-wraped">
						<div id="index" class="tab-pane active">
							<ul class="part-list unstyled">
								<li>手机</li>
								<li>手机壳</li>
								<li>内存卡</li>
								<li>Iphone配件</li>
								<li>贴膜</li>
								<li>手机耳机</li>
								<li>移动电源</li>
								<li>平板电脑</li>
							</ul>
							<ul class="goods-list unstyled">
								<li>
									<div class="list-wrap">
										<div class="p-img">
											<img src="/static/home/img/_/part01.png" />
										</div>
										<div class="attr">
											<em>Apple苹果iPhone 6s (A1699)</em>
										</div>
										<div class="price">
											<strong>
											<em>¥</em>
											<i>6088.00</i>
										</strong>
										</div>
										<div class="operate">
											<a href="javascript:void(0);" class="sui-btn btn-bordered">加入购物车</a>
										</div>
									</div>
								</li>
								<li>
									<div class="list-wrap">
										<div class="p-img">
											<img src="/static/home/img/_/part02.png" />
										</div>
										<div class="attr">
											<em>Apple苹果iPhone 6s (A1699)</em>
										</div>
										<div class="price">
											<strong>
											<em>¥</em>
											<i>6088.00</i>
										</strong>
										</div>
										<div class="operate">
											<a href="javascript:void(0);" class="sui-btn btn-bordered">加入购物车</a>
										</div>
									</div>
								</li>
								<li>
									<div class="list-wrap">
										<div class="p-img">
											<img src="/static/home/img/_/part03.png" />
										</div>
										<div class="attr">
											<em>Apple苹果iPhone 6s (A1699)</em>
										</div>
										<div class="price">
											<strong>
											<em>¥</em>
											<i>6088.00</i>
										</strong>
										</div>
										<div class="operate">
											<a href="javascript:void(0);" class="sui-btn btn-bordered">加入购物车</a>
										</div>
									</div>
									<div class="list-wrap">
										<div class="p-img">
											<img src="/static/home/img/_/part02.png" />
										</div>
										<div class="attr">
											<em>Apple苹果iPhone 6s (A1699)</em>
										</div>
										<div class="price">
											<strong>
											<em>¥</em>
											<i>6088.00</i>
										</strong>
										</div>
										<div class="operate">
											<a href="javascript:void(0);" class="sui-btn btn-bordered">加入购物车</a>
										</div>
									</div>
									<div class="list-wrap">
										<div class="p-img">
											<img src="/static/home/img/_/part03.png" />
										</div>
										<div class="attr">
											<em>Apple苹果iPhone 6s (A1699)</em>
										</div>
										<div class="price">
											<strong>
											<em>¥</em>
											<i>6088.00</i>
										</strong>
										</div>
										<div class="operate">
											<a href="javascript:void(0);" class="sui-btn btn-bordered">加入购物车</a>
										</div>
									</div>
								</li>
							</ul>
						</div>
						<div id="profile" class="tab-pane">
							<p>推荐品牌</p>
						</div>
					</div>
				</div>
				<div class="fr detail">
					<div class="clearfix fitting">
						<h4 class="kt">选择搭配</h4>
						<div class="good-suits">
							<div class="fl master">
								<div class="list-wrap">
									<div class="p-img">
										<img src="/static/home/img/_/l-m01.png" />
									</div>
									<em>￥5299</em>
									<i>+</i>
								</div>
							</div>
							<div class="fl suits">
								<ul class="suit-list">
									<li class="">
										<div id="">
											<img src="/static/home/img/_/dp01.png" />
										</div>
										<i>Feless费勒斯VR</i>
										<label data-toggle="checkbox" class="checkbox-pretty">
											<input type="checkbox"><span>39</span>
										</label>
									</li>
									<li class="">
										<div id=""><img src="/static/home/img/_/dp02.png" /> </div>
										<i>Feless费勒斯VR</i>
										<label data-toggle="checkbox" class="checkbox-pretty">
											<input type="checkbox"><span>50</span>
										</label>
									</li>
									<li class="">
										<div id=""><img src="/static/home/img/_/dp03.png" /></div>
										<i>Feless费勒斯VR</i>
											<label data-toggle="checkbox" class="checkbox-pretty">
											<input type="checkbox"><span>59</span>
										</label>
									</li>
									<li class="">
										<div id=""><img src="/static/home/img/_/dp04.png" /></div>
										<i>Feless费勒斯VR</i>
										<label data-toggle="checkbox" class="checkbox-pretty">
											<input type="checkbox"><span>99</span>
										</label>
									</li>
								</ul>
							</div>
							<div class="fr result">
								<div class="num">已选购0件商品</div>
								<div class="price-tit"><strong>套餐价</strong></div>
								<div class="price">￥5299</div>
								<button class="sui-btn  btn-danger addshopcar">加入购物车</button>
							</div>
						</div>
					</div>
					<div class="tab-main intro">
						<ul class="sui-nav nav-tabs tab-wraped">
							<li class="active">
								<a href="#one" data-toggle="tab">
									<span>商品介绍</span>
								</a>
							</li>
							<li>
								<a href="#two" data-toggle="tab">
									<span>规格与包装</span>
								</a>
							</li>
							<li>
								<a href="#three" data-toggle="tab">
									<span>售后保障</span>
								</a>
							</li>
							<li>
								<a href="#four" data-toggle="tab">
									<span>商品评价</span>
								</a>
							</li>
							<li>
								<a href="#five" data-toggle="tab">
									<span>手机社区</span>
								</a>
							</li>
						</ul>
						<div class="clearfix"></div>
						<div class="tab-content tab-wraped">
							<div id="one" class="tab-pane active">
								<ul class="goods-intro unstyled">
									{foreach $info.goods_attr as $attr}
									<li>{$attr.attr_name}：{$attr.attr_value}</li>
									{/foreach}
<!--									<li>分辨率：1920*1080(FHD)</li>-->
<!--									<li>后置摄像头：1200万像素</li>-->
<!--									<li>前置摄像头：500万像素</li>-->
<!--									<li>核 数：其他</li>-->
<!--									<li>频 率：以官网信息为准</li>-->
<!--									<li>品牌： Apple</li>-->
<!--									<li>商品名称：APPLEiPhone 6s Plus</li>-->
<!--									<li>商品编号：1861098</li>-->
<!--									<li>商品毛重：0.51kg</li>-->
<!--									<li>商品产地：中国大陆</li>-->
<!--									<li>热点：指纹识别，Apple Pay，金属机身，拍照神器</li>-->
<!--									<li>系统：苹果（IOS）</li>-->
<!--									<li>像素：1000-1600万</li>-->
<!--									<li>机身内存：64GB</li>-->
								</ul>
								<div class="intro-detail">
									{$info.goods_desc}
									<img src="/static/home/img/_/intro01.png" />
									<img src="/static/home/img/_/intro02.png" />
									<img src="/static/home/img/_/intro03.png" />
								</div>
							</div>
							<div id="two" class="tab-pane">
								<p>规格与包装</p>
							</div>
							<div id="three" class="tab-pane">
								<p>售后保障</p>
							</div>
							<div id="four" class="tab-pane">
								<div class="comment">
									<div class="com-tit">商品评价</div>
									<div class="com-percent">
										<p>好评度 <span class="percent">96%</span></p>
									</div>
									<div class="com-tab-type">
										<ul class="type">
											<li class="current"><a href="javascript:;">全部评价(123456)</a></li>
											<li><a href="javascript:;">晒图(500)</a></li>
											<li><a href="javascript:;">追评(500)</a></li>
											<li><a href="javascript:;">好评(500)</a></li>
											<li><a href="javascript:;">中评(500)</a></li>
											<li><a href="javascript:;">差评(500)</a></li>
										</ul>
										<div class="content">
											<div class="com-item">
												<div class="user-column">
													<div class="username"><img src="/static/home/img/_/photo.jpg"/>用户****1</div>
													<div class="usernum">品享值258698</div>
												</div>
												<div class="user-info">
													<div class="stars star4"></div>
													<p>手机还不错，可以的可以的</p>
													<div class="guige">
														<ul class="mini">
															<li>玫瑰金</li>
															<li>标配版</li>
															<li>2017-11-02 13:23</li>
														</ul>
														<div class="operate">
															<span id="collect"><i class="sui-icon icon-tb-like"></i> 325</span>
															<span id="comment"><i class="sui-icon icon-tb-wang"></i> 256</span>
														</div>
														<div class="clearfix"></div>
													</div>
												</div>
											</div>
											<div class="com-item">
												<div class="user-column">
													<div class="username"><img src="/static/home/img/_/photo.jpg"/>用户****1</div>
													<div class="usernum">品享值258698</div>
												</div>
												<div class="user-info">
													<div class="stars star4"></div>
													<p>手机还不错，可以的可以的</p>
													<div class="guige">
														<ul class="mini">
															<li>玫瑰金</li>
															<li>标配版</li>
															<li>2017-11-02 13:23</li>
														</ul>
														<div class="operate">
															<span id="collect"><i class="sui-icon icon-tb-like"></i> 325</span>
															<span id="comment"><i class="sui-icon icon-tb-wang"></i> 256</span>
														</div>
														<div class="clearfix"></div>
													</div>
												</div>
											</div>
											<div class="com-item">
												<div class="user-column">
													<div class="username"><img src="/static/home/img/_/photo.jpg"/>用户****1</div>
													<div class="usernum">品享值258698</div>
												</div>
												<div class="user-info">
													<div class="stars star4"></div>
													<p>手机还不错，可以的可以的</p>
													<div class="guige">
														<ul class="mini">
															<li>玫瑰金</li>
															<li>标配版</li>
															<li>2017-11-02 13:23</li>
														</ul>
														<div class="operate">
															<span id="collect"><i class="sui-icon icon-tb-like"></i> 325</span>
															<span id="comment"><i class="sui-icon icon-tb-wang"></i> 256</span>
														</div>
														<div class="clearfix"></div>
													</div>
												</div>
											</div>
											<div class="com-item">
												<div class="user-column">
													<div class="username"><img src="/static/home/img/_/photo.jpg"/>用户****1</div>
													<div class="usernum">品享值258698</div>
												</div>
												<div class="user-info">
													<div class="stars star4"></div>
													<p>手机还不错，可以的可以的</p>
													<div class="guige">
														<ul class="mini">
															<li>玫瑰金</li>
															<li>标配版</li>
															<li>2017-11-02 13:23</li>
														</ul>
														<div class="operate">
															<span id="collect"><i class="sui-icon icon-tb-like"></i> 325</span>
															<span id="comment"><i class="sui-icon icon-tb-wang"></i> 256</span>
														</div>
														<div class="clearfix"></div>
													</div>
												</div>
											</div>
											<div class="com-item">
												<div class="user-column">
													<div class="username"><img src="/static/home/img/_/photo.jpg"/>用户****1</div>
													<div class="usernum">品享值258698</div>
												</div>
												<div class="user-info">
													<div class="stars star4"></div>
													<p>手机还不错，可以的可以的</p>
													<div class="guige">
														<ul class="mini">
															<li>玫瑰金</li>
															<li>标配版</li>
															<li>2017-11-02 13:23</li>
														</ul>
														<div class="operate">
															<span id="collect"><i class="sui-icon icon-tb-like"></i> 325</span>
															<span id="comment"><i class="sui-icon icon-tb-wang"></i> 256</span>
														</div>
														<div class="clearfix"></div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div id="five" class="tab-pane">
								<p>手机社区</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--like-->
			<div class="clearfix"></div>
			<div class="like">
				<h4 class="kt">猜你喜欢</h4>
				<div class="like-list">
					<ul class="yui3-g">
						<li class="yui3-u-1-6">
							<div class="list-wrap">
								<div class="p-img">
									<img src="/static/home/img/_/itemlike01.png" />
								</div>
								<div class="attr">
									<em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
								</div>
								<div class="price">
									<strong>
											<em>¥</em>
											<i>3699.00</i>
										</strong>
								</div>
								<div class="commit">
									<i class="command">已有6人评价</i>
								</div>
							</div>
						</li>
						<li class="yui3-u-1-6">
							<div class="list-wrap">
								<div class="p-img">
									<img src="/static/home/img/_/itemlike02.png" />
								</div>
								<div class="attr">
									<em>Apple苹果iPhone 6s/6s Plus 16G 64G 128G</em>
								</div>
								<div class="price">
									<strong>
											<em>¥</em>
											<i>4388.00</i>
										</strong>
								</div>
								<div class="commit">
									<i class="command">已有700人评价</i>
								</div>
							</div>
						</li>
						<li class="yui3-u-1-6">
							<div class="list-wrap">
								<div class="p-img">
									<img src="/static/home/img/_/itemlike03.png" />
								</div>
								<div class="attr">
									<em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
								</div>
								<div class="price">
									<strong>
											<em>¥</em>
											<i>4088.00</i>
										</strong>
								</div>
								<div class="commit">
									<i class="command">已有700人评价</i>
								</div>
							</div>
						</li>
						<li class="yui3-u-1-6">
							<div class="list-wrap">
								<div class="p-img">
									<img src="/static/home/img/_/itemlike04.png" />
								</div>
								<div class="attr">
									<em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
								</div>
								<div class="price">
									<strong>
											<em>¥</em>
											<i>4088.00</i>
										</strong>
								</div>
								<div class="commit">
									<i class="command">已有700人评价</i>
								</div>
							</div>
						</li>
						<li class="yui3-u-1-6">
							<div class="list-wrap">
								<div class="p-img">
									<img src="/static/home/img/_/itemlike05.png" />
								</div>
								<div class="attr">
									<em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
								</div>
								<div class="price">
									<strong>
											<em>¥</em>
											<i>4088.00</i>
										</strong>
								</div>
								<div class="commit">
									<i class="command">已有700人评价</i>
								</div>
							</div>
						</li>
						<li class="yui3-u-1-6">
							<div class="list-wrap">
								<div class="p-img">
									<img src="/static/home/img/_/itemlike06.png" />
								</div>
								<div class="attr">
									<em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
								</div>
								<div class="price">
									<strong>
											<em>¥</em>
											<i>4088.00</i>
										</strong>
								</div>
								<div class="commit">
									<i class="command">已有700人评价</i>
								</div>
							</div>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<input type="hidden" value="{$info.sku}" id="sku">
<!--		自定义表单 存储添加购物车/购买的商品信息-->
		<form action="/addCart" method="post">
			<input type="hidden" value="0" name="sku_id">
			<input type="hidden" value="0" name="number">
		</form>
	</div>
	<script>
		// 更新价格
		var sku = JSON.parse($('#sku').val());
		// 规格选择
		$('#specification dl dd a').click(function () {
			// 其他的属性值、取消选中
			$(this).parent().parent().find('a').removeClass('selected');
			// 添加一个选择的属性
			$(this).addClass('selected');
			var value_ids = '';
			// 获取有选中样式的标签
			$.each($('.selected'),function (i,v) {
				value_ids = value_ids + '_' + $(v).attr('spec_value_id')
			})
			value_ids = value_ids.substr(1);
			// 获取价格
			var price = sku[value_ids]['price'];
			$('.price em').text(price)

		})

		/**
		 * 购买数量+1
		 */
		$('#plus').click(function () {
			// 获取到当前的数量
			var number = $('#number').val();
			var addAfter = parseInt(number) + 1;
			if (addAfter > 10) {
				$('#number').val(10);
			} else {
				$('#number').val(addAfter);
			}

		});
		// 减一
		$('#mins').click(function () {
			// 获取到当前的数量
			var number = $('#number').val();
			var reduceAfter = parseInt(number) - 1;
			if (reduceAfter <= 1) {
				$('#number').val(1);
			} else {
				$('#number').val(reduceAfter);
			}

		});
		// 输入
		$('#number').blur(function () {
			// 获取到当前的数量
			var number = $('#number').val();
			if (number <= 0) {
				$('#number').val(1);
			} else if(number > 10) {
				$('#number').val(10);
			}
		});
		// 添加至购物车
		$('.addshopcar').click(function () {
			// spu_id、sku_id、number、user_id
			var value_ids = '';
			// 获取有选中样式的标签
			$.each($('.selected'),function (i,v) {
				value_ids = value_ids + '_' + $(v).attr('spec_value_id')
			})
			value_ids = value_ids.substr(1);
			// 获取sku_id、购买数量number
			var sku_id = sku[value_ids]['id'];
			var number = $('#number').val();
			$("[name='sku_id']").val(sku_id);
			$("[name='number']").val(number);
			$('form').submit();
		})
	</script>
</body>
